package com.exam.api.config.validation;


import jakarta.validation.Valid;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.experimental.Delegate;

import java.util.ArrayList;
import java.util.List;

/**
 * @Author bcheng
 * @Create 2023/12/26 11:04
 * @Description 包装List
 */
@Data
@AllArgsConstructor
public class ValidateList<E> {
    @Valid
    @Delegate
    public List<E> list;

    public ValidateList() {
        this(new ArrayList<>());
    }

    @Override
    public String toString() { return list.toString(); }
}
